home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / fontutil.6 / fontutil / fontutils-0.6 / include / logreport.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-10-02  |  1.7 KB  |  52 lines

  1. /* logreport.h: status reporting routines.
  2.  
  3. Copyright (C) 1992 Free Software Foundation, Inc.
  4.  
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2, or (at your option)
  8. any later version.
  9.  
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. GNU General Public License for more details.
  14.  
  15. You should have received a copy of the GNU General Public License
  16. along with this program; if not, write to the Free Software
  17. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  18.  
  19. #ifndef LOGREPORT_H
  20. #define LOGREPORT_H
  21.  
  22. #include <stdio.h>
  23. #include "types.h"
  24.  
  25. /* report.h is a separate file because the programs which use it are a
  26.    proper subset of the programs which use us.  */
  27. #include "report.h"
  28.  
  29.  
  30. /* The file we write information to.  */
  31. extern FILE *log_file;
  32.  
  33. /* Only write if this is true.  */
  34. extern boolean logging;
  35.  
  36. #define LOG(s)                                \
  37.   do { if (logging) fputs (s, log_file); } while (0)
  38. #define LOG1(s, e)                            \
  39.   do { if (logging) fprintf (log_file, s, e); } while (0)
  40. #define LOG2(s, e1, e2)                            \
  41.   do { if (logging) fprintf (log_file, s, e1, e2); } while (0)
  42. #define LOG3(s, e1, e2, e3)                        \
  43.   do { if (logging) fprintf (log_file, s, e1, e2, e3); } while (0)
  44. #define LOG4(s, e1, e2, e3, e4)                        \
  45.   do { if (logging) fprintf (log_file, s, e1, e2, e3, e4); } while (0)
  46. #define LOG5(s, e1, e2, e3, e4, e5)                    \
  47.   do { if (logging) fprintf (log_file, s, e1, e2, e3, e4, e5); } while (0)
  48.  
  49. extern void flush_log_output (void);
  50.  
  51. #endif /* not LOGREPORT_H */
  52.